<template>
	<view>
		<cu-custom bgColor="bg-white" :isBack="true">
			<block slot="backText">新增地址</block>
		</cu-custom>
		<form>
			<view class="cu-form-group margin-top-xs">
				<view class="title"> 订餐人 &nbsp;&nbsp;&nbsp;</view>
				<input placeholder="请输入联系人" name="input"></input>
				<view>
						<label class="radio" style="margin-right: 30upx;">
							<radio value="r1" color="#FFCC33" checked="true" style="transform:scale(0.7)"/>先生
						</label>
						<label class="radio">
							<radio value="r2" color="#FFCC33" style="transform:scale(0.7)"/>女士
						</label>
				</view>
			</view>
			
			<view class="cu-form-group">
				<view class="title">联系方式</view>
				<input placeholder="请输入手机号" type="number"></input>
			</view>
			
			<view class="cu-form-group">
				<view class="title">收货地址</view>
				<input placeholder="请选择地址" :value="address"></input>
				<text class='cuIcon-locationfill text-orange' @tap="choose"></text>
			</view>
			<view class="cu-form-group">
				<view class="title">具体地址</view>
				<input placeholder="如1号楼601" name="input"></input>
			</view>
			
		</form>
		<view class="cu-bar tabbar foot" @tap="newAddr">
				<button class="cu-btn bg-orange margin-lr lg" style="width: 100%;">保存</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				address: ''
			}
		},
		methods: {
			choose(){
				uni.chooseLocation({
				    success: function (res) {
						this.address = res.address
						console.log(this.address)
				        console.log('位置名称：' + res.name);
				        console.log('详细地址：' + res.address);
				        console.log('纬度：' + res.latitude);
				        console.log('经度：' + res.longitude);
				    }.bind(this)
				});
			}
			
		}
	}
</script>

<style>

</style>
